<?php

use Illuminate\Support\Facades\Route;

Route::group(['prefix'=>'v1','middleware'=>'throttle:5,1'],function (){
    //用户登录
    Route::post('phonelogin', [\App\Api\Controllers\LoginController::class, 'phoneLogin']);
    //QQ登录
    Route::post('qqcallback', [\App\Api\Controllers\LoginController::class, 'qqCallback']);
    //注册
    Route::post('registered', [\App\Api\Controllers\MembersController::class, 'registered']);
    //密码
    Route::post('password', [\App\Api\Controllers\MembersController::class, 'password']);
    //秒杀查询
    Route::get('sklist', [\App\Api\Controllers\SeckillController::class, 'seckillList']);
    //实时热抢
    Route::get('hotrush', [\App\Api\Controllers\SeckillController::class, 'hotRush']);
    //时间区间查询
    Route::any('sktime', [\App\Api\Controllers\SeckillController::class, 'skTime']);
    //进行秒杀
    Route::any('makesecond',[\App\Api\Controllers\SeckillController::class,'makeSecond']);
    //商品详情&评论详情
    Route::post('getdetail', [\App\Api\Controllers\SeckillController::class, 'getDetail']);
    //拼团活动
    Route::get('group', [\App\Api\Controllers\GroupingController::class, 'HavePintuan']);
    //拼团列表API
    Route::get('grouplist', [\App\Api\Controllers\GroupingController::class, 'groupList']);
    //拼团商品详情表
    Route::get('groupdetail', [\App\Api\Controllers\GroupingController::class, 'groupDetail']);
    //购物车商品添加
    Route::post('addcart',[\App\Api\Controllers\ShopingCartController::class,'addCart']);
    //商品售后
    Route::post('aftersales',[\App\Api\Controllers\ShopingCartController::class,'afterSales']);
    //收藏接口
    Route::post('collection',[\App\Api\Controllers\ShopingCartController::class,'collection']);
    //拼团组详情表
    Route::get('groupall', [\App\Api\Controllers\GroupingController::class, 'groupAll']);
    // 拼团分享接口
    Route::post('groupshare',[\App\Api\Controllers\GroupShareController::class,'insertGroup']);
    //立即拼团
    Route::post('nowpintuan',[\App\Api\Controllers\GroupingController::class,'nowPintuan']);
    //用户收货地址详情
    Route::post('useraddr',[\App\Api\Controllers\AddrController::class,'getArrdList']);
    //用户订单列表
    Route::post('orderlist',[\App\Api\Controllers\OrderListController::class,'orderList']);
    //快递单号
    Route::get('logistics',[\App\Api\Controllers\OrderListController::class,'logistics']);



    //手机验证码
    Route::post('phoneverify', [\App\Api\Controllers\MembersController::class, 'phoneVerify']);

    //修改密码
    Route::post('savepassword', [\App\Api\Controllers\MembersController::class, 'savePassword']);
    //用户信息
    Route::get('memberinfo', [\App\Api\Controllers\MembersController::class, 'memberInfo']);
    //修改昵称
    Route::post('savenickname', [\App\Api\Controllers\MembersController::class, 'saveNickname']);
    //文件上传
    Route::post('upfile', [\App\Api\Controllers\MembersController::class, 'upFile']);
    //修改头像
    Route::post('saveavatar', [\App\Api\Controllers\MembersController::class, 'saveAvatar']);
    //砍价活动
    Route::get('bargainslist', [\App\Api\Controllers\BargainController::class, 'BargainsList']);
    //添加地址
    Route::post('useraddress', [\App\Api\Controllers\ShippingAddressController::class, 'addAddress']);

    //查询直播列表所有数据，根据时间倒序排列
    Route::post('getliveList', [\App\Api\Controllers\LiveController::class,'getLiveList']);
    // 查询单个主播的信息
    Route::post('getanchor', [\App\Api\Controllers\LiveController::class,'getAnchor']);
    // 关闭直播
    Route::post('liveover',[\App\Api\Controllers\LiveController::class,'LiveOver']);
});


